class Admin::CountController < Admin::BaseController

  def index
    @q = Score.joins(:department).ransack(params[:q])
    @colls = @q.result.select('departments.dpname')
  end

  def yearly
    @q = Score.joins(:department).ransack(params[:q])
    @colls = @q.result.select('departments.dpname, sum(amount)')
  end

end
